Remove inverse_round
and alternate definition of is_round()
#1736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially addresses #1709 and related to the old #1667 that was closed to address each issue independently.
After Matthew's input here, we now know that MIPS and Keccak columns won't intermingle because we will be having two different instances (one for each). This means that we don't need to consider the case that a row is not a sponge nor a round, but an instruction. Consequently, we can be fine with a negated definition of
is_round()
asnot(is_sponge())
, reducing by one not only the columns (because we no longer needinverse_round
to check that the round number is nonzero) but it also removes one constraint. It removes the dummy entry of the round constants table, as the 0 entry now corresponds to the first keccak round (as it used to be before #1596)This simplifies the code and reduces some code duplications in the main.